package com.tenement.base.exception;

public class Test {
	static String s = null;

	public static void main(String[] args) {

		// 异常被捕获不会影响catch块之后的代码执行，在try块中抛出异常语句之后的代码不会被执行
		try {
			if (s == null) {
				throw new ParameterException("【参数：用户名为空】");
			}
			System.out.println(1);
			System.out.println(1);
			System.out.println(1);
		} catch (ParameterException p) {
			p.printStackTrace();
		} finally {
			System.out.println(3);
			System.out.println(3);
			System.out.println(3);
		}
		System.out.println(2);
		System.out.println(2);
		System.out.println(2);
	}

}
